<html>
    <script>
        Promise.all([
          new Promise((r,e)=>{
            setTimeout(() => {
              r("1")
            }, 1000);
        }),
        new Promise((r,e)=>{
            setTimeout(() => {
              r("2")
            }, 2000);
        })
        ]).then(res=>{
          console.log(res)
        })
    </script>
</html>